package com.ojtest.demo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class code1 {
    public static void main(String[] args) {
        // list
//        List<Integer> list = List.of(1, 2, 3, 4, 5);
//        System.out.println(list);

        // set
//        Set<Integer> set = Set.of(1, 2, 3, 4, 5);
//        System.out.println(set);

        HashMap<Integer, String> map = new HashMap<>();
        map.put(1,"a");
        map.put(2,"a");
        map.put(3,"a");

        Map<Object, Object> entries = Map.ofEntries(map.entrySet().toArray(new Map.Entry[0]));

        Map<Integer, String> map1 = Map.copyOf(map);
    }
}
